package com.zmkj.cn.comm.constant;

import com.zmkj.cn.comm.vo.IErrorCode;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
 * @author 伍绍宇
 * 返回code
 */
@Getter
@AllArgsConstructor
public enum ResultCode implements IErrorCode {
    /**
     * 错误操作
     */
    SUCCESS(0, "操作成功", null),
    NOT_IN_WHITELIST(-1314, "不在白名单内或者访问口令错误", null),
    NOT_HAVE_TOKEN(-100, "未检测到token", null),
    SUCCESS_SOCKET(12, "推送消息", null),
    FAILED(-1, "操作失败", null),
    VALIDATE_FAILED(-2, "参数检验失败", null),
    UNAUTHORIZED(-100, "暂未登录或token已经过期", null),
    HOSPITAL_ERROR(-1, "医院信息异常", null),
    HOSPITAL_NOT_FOUND(-1,"未在分发器找到医院信息",null),
    FORBIDDEN(-3, "没有相关权限", null),
    NOT_RELATION(10, "没有关联手机号", null),
    NOT_BIND_REPAIR(11, "无码保修,请求换取token", null),
    WX_CODE_ERROR(-1, "code错误", 40029),
    WX_BUSY_ERROR(-1, "系统繁忙，此时请开发者稍候再试",-1),
    WX_NET_ERROR(-1, "网络故障",null),
    WX_CLICK_ERROR(-1, "频率限制，每个用户每分钟100次", 45011),
    WX_NOT_ERROR(-1, "系统未录入该手机号或手机号已经被其它微信号绑定", null),
    WX_BIND_ERROR(-1, "该用户已经被注册", null),
    WX_CODE_COVER(-1, "code重复使用", 41008);

    public int code;
    public String msg;
    public Integer value;

    @Override
    public long getCode() {
        return code;
    }
    @Override
    public String getMsg() {
        return msg;
    }
}
